import { ArrayMinSize, IsInt, IsNotEmpty, ValidateIf } from 'class-validator'
export class CreatePurchaseDto {
    id:number
    @IsNotEmpty({message: '请选择供应商'})
    @IsInt()
    supplierId: number
    @ArrayMinSize(1, {message: '请至少选择一个商品'})
    goodItems: Array<{
        id: number
        quantity: number
        price: number,
        unitCost: number
    }>
    @IsNotEmpty({message: '请选择申请人'})
    @IsInt()
    applyAdminId: number

}
